<!--
 * @Author: jay
 * @Date: 2021-08-17 15:46:15
 * @LastEditTime: 2021-08-17 15:56:05
 * @LastEditors: Please set LastEditors
 * @Description: 垂直居中
 * @FilePath: \Briup\Common\study\2-css\3-其他样式规则\2-vertical.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>垂直居中</title>
    <style>
        .one{
            background-color: mediumseagreen;
            color: #fff;
            height: 100px;
            text-align: center;                                 /* 水平居中 */
            line-height: 100px;                            /* 垂直居中   1设置行高*/
        }
    </style>
</head>
<body>
    <div class="one">
        hello world
    </div>
</body>
</html>